GBML manual / Backgrounds

actor_picture

Swaps the Background Actor's picture for another actor picture, written in quotes as the picture is named in the Paint tab: actor_picture("mother_p2"). Its place, scale and angle stay.

Game Boy: not available

Game Boy Color: not available

Sega Genesis: not built yet

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

actor_picture(picture)

Arguments

NameType
picturestring

Returns

Nothing.

Description

Swaps the Background Actor's picture for another actor picture, written in quotes as the picture is named in the Paint tab. Its place, scale and angle stay. It does nothing in a room that has no zoomable background.

The old picture is let go first and the new one built in its place, so the swap is one frame of work (two or three screens of tiles): do it while a screen effect covers the room. The pictures should share one size and one anchor, and the pins come from the new picture. If the console has no room for the new picture the actor is left without one and the game carries on. A name that is not an actor picture of the game does nothing.

Example

// Step event of the boss: phase two begins a minute in (a real fight would count her health).
if (frame_count == 3600) {
    actor_picture("mother_p2");
}

Her picture changes once, and keeps standing, scaling and turning where it was.

On the GBA

A no-op in a room that has no zoomable background (set the room's Zoomable background to an actor picture). The old picture is let go first and the new one built in its place, so the swap is one frame of work (two or three screens of tiles): do it while a screen effect covers the room. The pictures should share the same size and anchor; pins come from the new picture. If the console has no room for the new picture the actor is left without one and the game carries on.

See also: Background actorsactor_visibleactor_pin_x